State Listener Callbacks
The connection state listener is an interface with the following callbacks:
- stateChanged. This is called when the connected status of a connection changes. The connected status is represented by the isConnected Boolean in the DOFConnection.State. When a connection is connected, the isConnected Boolean is "true." When a connection becomes disconnected, the isConnected Boolean is "false."
- removed. The sample shows these methods as "empty," but they can be used to clean up resources associated with a state listener.
- complete. This is called whenever an attempt to connect has finished. It is called regardless of whether or not the attempt to connect was successful.